package Fyysika_Ylesanded;
import javax.swing.ImageIcon;

public class joonis {
	
	
	 public ImageIcon createImageIcon(String path) {
		    java.net.URL imgURL = joonis.class.getResource(path);
		     if (imgURL != null) {
		         return new ImageIcon(imgURL);
		     } else {
		         System.err.println("Couldn't find file: " + path);
		         return null;
		     }
		 }

}


